<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="java.util.*"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.sql.*"%>
<%@page import="java.sql.SQLException"%>
<%@page import="dreamtime.dreamnews.*"%>
<%@page import="dreamtime.dreamnews.news.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>河南物料物流有限公司</title>
<meta name="Keywords" content="河南物料物流有限公司"/>
<meta name="Description" content="河南物料物流有限公司" />
<link href="css/css.css" type="text/css" rel="stylesheet" />
<!-- IE6下PNG图片背景透明 -->
<SCRIPT src="js/touming.js" type=text/javascript></SCRIPT>
<!-- banner幻灯效果 -->
<script src="js/yu.js" type="text/javascript"></script>
<script src="js/tb.js" type="text/javascript"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<!-- 屏蔽JS错误的代码 -->
<script>
function ResumeError() { 
return true; 
} 
window.onerror = ResumeError;
</script>

<body>
<%      DBConnection accessconn=new DBConnection();
        Connection conn=null;
        PreparedStatement pstmt=null;
		PreparedStatement pstmt1=null;
		ResultSet rs=null;	
		try{ 
        conn=accessconn.getConn();
        pstmt=conn.prepareStatement("select * from news where newsid=?");
%>
<jsp:include page="header.jsp" flush="true"/>
<!-- box begin -->
<div class="BOX_top all_width">
   <div id="box">  
<!-- banner begin -->
<div id="MainPromotionBanner">
   <div id="SlidePlayer">
      <ul class="Slides">
         <li><a target="_blank" href="#"><img src="images/banner1.jpg"></a></li>
         <li><a target="_blank" href="#"><img src="images/banner2.jpg"></a></li>
         <li><a target="_blank" href="#"><img src="images/banner3.jpg"></a></li>
      </ul>
   </div>
   <script type="text/javascript">
	   TB.widget.SimpleSlide.decoration('SlidePlayer', {eventType:'mouse', effect:'scroll'});
   </script>
</div>
<!-- banner end -->
<table width="1000" border="0" cellpadding="0" cellspacing="0" class="left">
  <tr>
    <td align="left" valign="top" id="about_box_left">
    <jsp:include page="left.jsp" flush="true"/>
    </td>
    <td align="left" valign="top" id="about_box_right">
    <%
//新闻newsid
        int newsid=432;
        String newsidString=request.getParameter("newsid");
        if(newsidString!=null&&newsidString.matches("[0-9]*[1-9][0-9]*"))
        {
        newsid=Integer.parseInt(newsidString);
        }
        //得到新闻信息
        HashMap newsMap=new HashMap();
         newsMap=LinkNews.getNewsInfo(conn,pstmt,rs,newsid);
		//得到新闻标题
		String	newsTitle=newsMap.get("NewsTitle").toString();
		//得到新闻父类
		String	newsParentClass=newsMap.get("BigClassID").toString();
		//得到新闻类别
		String	newsClass=newsMap.get("SmallClassID").toString();
		//得到新闻时间
		String	newsTime=newsMap.get("NewsTime").toString();
		//得到新闻内容
		String	content=newsMap.get("NewsContent").toString();
		//得到是否是视频文件
		String	isHead=newsMap.get("IsHead").toString();
		//得到视频地址
		String headPicture=(String)newsMap.get("HeadPicture");
		if(headPicture!=null){
		headPicture="../../"+headPicture;
		}
%>
       <dl id="box_right_tit">
          <dt>产品展示</dt>
          <dd>PRODUCT SHOW</dd>
       </dl>
        <div id="about_name">
		<%int smallclassid=Integer.parseInt(newsClass);%>
		<%=LinkBaseInfo.getSmallClassName(conn,pstmt1,rs,smallclassid)%>
		</div>
       <div id="product_right_box">
          <div id="product_info_div">
          <p>
            <center>
			<h4><%=newsTitle%></h4>
			</center>
			<center>
			<h5>
			日期：<%=newsTime%></h5>
			</center>
<div id="CuPlayer" >
</div>
<% 
if(isHead.equalsIgnoreCase("yes")){
%>
<script type="text/javascript">
var so = new SWFObject("player/CuPlayerMiniV20_Black_S.swf","CuPlayer","476","300","9","#000000");
so.addParam("allowfullscreen","true");
so.addParam("allowscriptaccess","always");
so.addParam("wmode","opaque");
so.addParam("quality","high");
so.addParam("salign","lt");
so.addVariable("CuPlayerFile","<%=headPicture%>");
so.addVariable("CuPlayerImage","player/headImage.jpg");
so.addVariable("CuPlayerShowImage","true");
so.addVariable("CuPlayerWidth","476");
so.addVariable("CuPlayerHeight","300");
so.addVariable("CuPlayerAutoPlay","false");
so.addVariable("CuPlayerAutoRepeat","false");
so.addVariable("CuPlayerShowControl","true");
so.addVariable("CuPlayerAutoHideControl","false");
so.addVariable("CuPlayerAutoHideTime","6");
so.addVariable("CuPlayerVolume","80");
so.write("CuPlayer");	
</script>
<%}%>
<br/>
		 <%=content%>
         </p>
          </div>
       </div>    
    </td>
  </tr>
</table>
  </div>
</div>
<%
  }catch(SQLException se){
  out.print(se.getMessage());
  }finally{
   accessconn.closeResultSet(rs);
  accessconn.closePreparedStatement(pstmt);
  accessconn.closeConnection(conn);
  }
%>
<!-- box end -->
<jsp:include page="footer.jsp" flush="true"/>
</body>
</html>
